/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.repair.service.impl;

import org.springblade.modules.repair.dto.PlanTemplateDTO;
import org.springblade.modules.repair.dto.PlanTemplateTypeDTO;
import org.springblade.modules.repair.dto.TemplateTltTreeStrDTO;
import org.springblade.modules.repair.entity.MaintainTemplateRelation;
import org.springblade.modules.repair.vo.MaintainTemplateRelationVO;
import org.springblade.modules.repair.mapper.MaintainTemplateRelationMapper;
import org.springblade.modules.repair.service.IMaintainTemplateRelationService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * 模板内容关系表 服务实现类
 *
 * @author ysq
 * @since 2022-03-29
 */
@Service
public class MaintainTemplateRelationServiceImpl extends BaseServiceImpl<MaintainTemplateRelationMapper, MaintainTemplateRelation> implements IMaintainTemplateRelationService {

	@Override
	public IPage<MaintainTemplateRelationVO> selectMaintainTemplateRelationPage(IPage<MaintainTemplateRelationVO> page, MaintainTemplateRelationVO maintainTemplateRelation) {
		return page.setRecords(baseMapper.selectMaintainTemplateRelationPage(page, maintainTemplateRelation));
	}

	@Override
	public List<PlanTemplateDTO> listTemplateContent(List<Long> templateIds, String tenantId) {
		return baseMapper.listTemplateContent(templateIds,tenantId);
	}

	@Override
	public List<PlanTemplateTypeDTO> listTemplateType(List<Long> templateIds) {
		return baseMapper.listTemplateType(templateIds);
	}

	@Override
	public List<TemplateTltTreeStrDTO> getTemplateTlt(Long templateId, Long tltId) {
		return baseMapper.getTemplateTlt(templateId,tltId);
	}

}
